using System;
using System.Collections.Generic;
using System.ComponentModel;

using Matchingo.Common.Types.Types;
using Matchingo.Common.Types.EventArguments;

namespace Matchingo.Common.Types.Interfaces
{
    /// <summary>
    /// Interface for the FacebookScoreProvider class which provides all the game records 
	/// that are shown on the high score board, if we are using the Facebook version
    /// </summary>
	/// <author>Michael Urvan</author>
	/// <revision>1.0</revision>
	public interface IFacebookHighScoreProvider : INotifyPropertyChanged
    {
		/// <summary>
        /// A list of all Game records which can be read by this provider
        /// </summary>
        //List<Game> GameRecords { get; }

		/// <summary>
		/// A list of all friend Game records which can be read by this provider
		/// </summary>
		//List<Game> FriendsGameRecords { get; }
		
		/// <summary>
        /// You must call this method to initialize before making use of any other methods/properties of this object
        /// </summary>
        void Initialize();

        /// <summary>
        /// Add a game record to the highscore list
        /// </summary>
        /// <param name="g">The Game to add</param>
        /// <param name="saveAsynchronously">Persist the data synchronously or asynchronously (avoid disk access lag time)</param>
        void AddRecord(Game g, bool saveAsynchronously);

        /// <summary>
        /// Gets a listing of the top XX number of highscores
        /// </summary>
        /// <param name="topNCount">The number of records to choose from the top</param>
        /// <returns>A list of the top XX number of highscores from the available highscores list</returns>
        List<Game> GetHighScoresByCardCount(int topNCount, int cardCount);

		/// <summary>
		/// Gets a listing of the top XX number of highscores
		/// </summary>
		/// <param name="topNCount">The number of records to choose from the top</param>
		/// <returns>A list of the top XX number of highscores from the available highscores list</returns>
		List<Game> GetFriendsHighScoresByCardCount(int topNCount, int cardCount);

		/// <summary>
		/// Gets a listing of the top XX number of highscores
		/// </summary>
		/// <param name="topNCount">The number of records to choose from the top</param>
		/// <returns>A list of the top XX number of highscores from the available highscores list</returns>
		void GetHighScoresByCardCountAsync(int topNCount, int cardCount);

		/// <summary>
		/// Gets a listing of the top XX number of highscores
		/// </summary>
		/// <param name="topNCount">The number of records to choose from the top</param>
		/// <returns>A list of the top XX number of highscores from the available highscores list</returns>
		void GetFriendsHighScoresByCardCountAsync(int topNCount, int cardCount);

		/// <summary>
		/// An event which fires when a previous gethighscores call completed
		/// </summary>
		event EventHandler<GetHighScoresCompletedEventArgs> GetHighScoresCompleted;

		/// <summary>
		/// An event which fires when a previous gethighscores call completed
		/// </summary>
		event EventHandler<GetFriendsHighScoresCompletedEventArgs> GetFriendsHighScoresCompleted;

		/// <summary>
        /// An event which fires whenever a new highscore record has been added
        /// </summary>
        event EventHandler<GameRecordAddedEventArgs> RecordAdded;
    }
}
